//package ipad.asia.config;
//
//import org.redisson.Redisson;
//import org.redisson.api.RedissonClient;
//import org.redisson.config.Config;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.util.StringUtils;
//
///**
// * redisson 配置，下面是单节点配置：
// * 官方wiki地址：https://github.com/redisson/redisson/wiki/2.-%E9%85%8D%E7%BD%AE%E6%96%B9%E6%B3%95#26-%E5%8D%95redis%E8%8A%82%E7%82%B9%E6%A8%A1%E5%BC%8F
// *
// */
//@Configuration
//public class RedissonConfig {
//
////    @Value("${spring.redis.host}")
////    private String host;
////
////    @Value("${spring.redis.port}")
////    private String port;
////
////    @Value("${spring.redis.password}")
////    private String password;
//
//    @Bean
//    public RedissonClient redissonClient(){
//        Config config = new Config();
//        //单节点
//        config.useSingleServer().setAddress("redis://49.235.177.225:6369");
////        if(StringUtils.isEmpty("6369180")){
////            config.useSingleServer().setPassword(null);
////        }else{
//            config.useSingleServer().setPassword("6369180");
////        }
//        //添加主从配置
////        config.useMasterSlaveServers().setMasterAddress("").setPassword("").addSlaveAddress(new String[]{"",""});
//
////         集群模式配置 setScanInterval()扫描间隔时间，单位是毫秒,  //可以用"rediss://"来启用SSL连接
////        config.useClusterServers().setScanInterval(2000).addNodeAddress("redis://49.235.177.225:6369", "redis://http://172.81.238.137:6369");
////                .addNodeAddress("redis://127.0.0.1:7002");
//        return Redisson.create(config);
//    }
//}